package com.redepronik.negosys.invfac.entity;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQuery;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

/**
 * The persistent class for the detalletraspaso database table.
 * 
 */
@Entity
@Table(schema = "invfac", name = "detalletraspaso")
@NamedQuery(name = "Detalletraspaso.findAll", query = "SELECT d FROM Detalletraspaso d")
public class Detalletraspaso implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@SequenceGenerator(allocationSize = 1, name = "DETALLETRASPASO_DETALLETRASPASOID_GENERATOR", sequenceName = "INVFAC.DETALLETRASPASO_DETALLETRASPASOID_SEQ")
	@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "DETALLETRASPASO_DETALLETRASPASOID_GENERATOR")
	@Column(unique = true, nullable = false)
	private Integer detalletraspasoid;

	@Column(nullable = false)
	private Integer cantidad;

	// bi-directional many-to-one association to Producto
	@ManyToOne
	@JoinColumn(name = "productoid", nullable = false)
	private Producto producto;

	// bi-directional many-to-one association to Traspaso
	@ManyToOne
	@JoinColumn(name = "traspasoid", nullable = false)
	private Traspaso traspaso;

	public Detalletraspaso() {
	}

	public Integer getCantidad() {
		return this.cantidad;
	}

	public Integer getDetalletraspasoid() {
		return this.detalletraspasoid;
	}

	public Producto getProducto() {
		return this.producto;
	}

	public Traspaso getTraspaso() {
		return this.traspaso;
	}

	public void setCantidad(Integer cantidad) {
		this.cantidad = cantidad;
	}

	public void setDetalletraspasoid(Integer detalletraspasoid) {
		this.detalletraspasoid = detalletraspasoid;
	}

	public void setProducto(Producto producto) {
		this.producto = producto;
	}

	public void setTraspaso(Traspaso traspaso) {
		this.traspaso = traspaso;
	}

}